// 此处第二个参数vm，就是我们在页面使用的this，你可以通过vm获取vuex等操作，更多内容详见uView对拦截器的介绍部分：
const install = (Vue, vm) => {
	// 将各个定义的接口名称，统一放进对象挂载到vm.$u.api(因为vm就是this，也即this.$u.api)下
	vm.$u.api = {
		// 今日
		//打赏记录技师
		getReward:(params) => vm.$u.post('/api/user/getReward', params),
		//用户点击次数统计
		serUserClick:(params) => vm.$u.post('/api/user/serUserClick', params),
		//商品评价列表
		goodsGetComment:(params) => vm.$u.post('/api/goods/getComment', params),
		
		//用户收货地址列表
		getAddress:(params) => vm.$u.post('/api/userAddress/getAddress', params),
		//保存地址
		setAddress:(params) => vm.$u.post('/api/userAddress/setAddress', params),
		//删除地址
		delAddress:(params) => vm.$u.post('/api/userAddress/del', params),
		//修改默认收货地址
		defaultAddress:(params) => vm.$u.post('/api/userAddress/default', params),
		//技师加盟
		staffJoin:(params) => vm.$u.post('/api/staff/staffJoin', params),
		// 银行列表
		getBank:(params) => vm.$u.post('/api/staff/getBank', params),
		
		// 会员卡绑定
		vipBind:(params) => vm.$u.post('/api/vip/vipBind', params),
		
		// 取消原因
		// getCancel:(params) => vm.$u.post('/api/project/getCancel', params),
		
		
		// 优惠券--领取
		receiveCouponById:(params) => vm.$u.post('/api/coupon/receiveCouponById', params),
		
		// 申请开票
		orderInvoicing:(params) => vm.$u.post('/api/orders/orderInvoicing', params),
		
		// 用户协议
		agreement:(params) => vm.$u.post('/api/user/agreement', params),
		
		// 代付订单信息
		payGetOrders:(params) => vm.$u.post('/api/pay/getOrders', params),
		
		// 商品分类
		goodsGetCate:(params) => vm.$u.post('/api/goods/getCate', params),
		
		// 分享用户消费
		shareUserList:(params) => vm.$u.post('/api/user/shareUserList', params),
		
		// 判断用户呼叫
		isCall:(params) => vm.$u.post('/api/orders/isCall', params),
		// 用户呼叫
		userCall:(params) => vm.$u.post('/api/orders/userCall', params),
		// 完成呼叫
		completeCall:(params) => vm.$u.post('/api/orders/completeCall', params),
		
		
		//快手登录
		ksLogin:(params) => vm.$u.post('/api/login/ksLogin', params),
		//微信登录
		wxLogin:(params) => vm.$u.post('/api/login/wxLogin', params),
		
		//获取用户信息
		userInfo:(params) => vm.$u.post('/api/user/getUser', params),
		//绑定手机号
		bindPhone:(params) => vm.$u.post('/api/user/bindPhone', params),
		
		
		// 平台会员卡
		getSysVip:(params) => vm.$u.post('/api/vip/getSysVip', params),
		// 购买平台会员卡
		buySysVip:(params) => vm.$u.post('/api/vip/buySysVip', params),
		// 平台会员卡支付
		hfSysPay:(params) => vm.$u.post('/api/vip/hfSysPay', params),
		// 平台绑定记录
		getSysBindList:(params) => vm.$u.post('/api/vip/getSysBindList', params),
		
		// 会员卡列表/详情
		getvip:(params) => vm.$u.post('/api/vip/getvip', params),
		// 已购会员卡列表
		getVipList:(params) => vm.$u.post('/api/user/getVipList', params),
		// 购买会员卡
		getbuyVip:(params) => vm.$u.post('/api/vip/buyVip', params),
		// 会员卡支付
		vipHfPay:(params) => vm.$u.post('/api/vip/hfPay', params),
		//用户点击次数统计
		serUserClick:(params) => vm.$u.post('/api/user/serUserClick', params),
		//更新个人用户详情
		setInfo:(params) => vm.$u.post('/api/user/setInfo', params),
		// 我的评价
		getUserComment:(params) => vm.$u.post('/api/user/getUserComment', params),
		// 删除评价
		delComment:(params) => vm.$u.post('/api/user/delComment', params),
		// 消息列表
		getMessage:(params) => vm.$u.post('/api/user/getMessage', params),
		//优惠券--用户领取的优惠券
		getUserCoupons:(params) => vm.$u.post('/api/coupon/getUserCoupons', params),
		// 提交投诉与建议setComplaint 
		setComplaint:(params) => vm.$u.post('/api/user/setComplaint', params),
		// 获取投诉与建议
		getComplaint:(params) => vm.$u.post('/api/user/getComplaint', params),
		// 消费记录
		getConsume:(params) => vm.$u.post('/api/user/getConsume', params),
		// 订单分享二维码
		getOrderQr:(params) => vm.$u.post('/api/orders/getOrderQr', params),
		// 我的邀请
		invitePoint:(params) => vm.$u.post('/api/user/invitePoint', params),
		
		
		
		//获取地址三级菜单
		tree:(params) => vm.$u.post('/api/userAddress/tree', params),
		//文件上传
		upload:(params) => vm.$u.post('/api/upload', params),

		// 优惠券
		//优惠券--领取
		receiveCouponById:(params) => vm.$u.get('/api/coupon/receiveCouponById', params),
		//优惠券--详情
		getCouponById:(params) => vm.$u.post('/api/coupon/getCouponById', params),
		//优惠券--用户领取的优惠券
		getUserCoupons:(params) => vm.$u.post('/api/coupon/getUserCoupons', params),
		
		//商城首页
		getHome:(params) => vm.$u.post('/api/goods/getHome', params),
		//商品查询/详情
		getGoods:(params) => vm.$u.post('/api/goods/getGoods', params),
		//商品评价列表(未调接口)
		goodsGetComment:(params) => vm.$u.post('/api/goods/getComment', params),
		
		// 项目加钟
		addClock:(params) => vm.$u.post('/api/orders/addClock', params),//项目加钟
		
		// 获取银行卡
		getUserCard:(params) => vm.$u.post('/api/user/getUserCard', params),
		// 会员卡提现
		vipWithdraw:(params) => vm.$u.post('/api/vip/withdraw', params),
		// 编辑银行卡
		setUserCard:(params) => vm.$u.post('/api/user/setUserCard', params),
		
		
		
		// 购物车
		joinCar:(params) => vm.$u.post('/api/cart/save', params),//加入购物车
		carLists:(params) => vm.$u.post('/api/cart/lists', params),//购物车列表
		updateNumber:(params) => vm.$u.post('/api/cart/updateNumber', params),//更新购物车数量
		delCars:(params) => vm.$u.post('/api/cart/del', params),//根据购物车ID，删除购物车数据
		
		// 订单管理
		confirmOrder:(params) => vm.$u.post('/api/orders/confirmOrders', params),//确认订单-商品
		confirmProjectOrders:(params) => vm.$u.post('/api/orders/confirmProjectOrders', params),//确认项目订单
		
		getFreight:(params) => vm.$u.post('/api/freight/getFreight', params),//获取运费
		createOrders:(params) => vm.$u.post('/api/orders/createOrders', params),//创建订单
		getOrders:(params) => vm.$u.post('/api/orders/getOrders', params),//获取订单详情
		confirmReceipt:(params) => vm.$u.post('/api/orders/confirmReceipt', params),//确认收货
		getComment:(params) => vm.$u.post('/api/orders/getComment', params),//商品待评价列表
		setComment:(params) => vm.$u.post('/api/orders/setComment', params),//商品保存评价
		getCoupon:(params) => vm.$u.post('/api/orders/getCoupon', params),//订单可用优惠券
		setReward:(params) => vm.$u.post('/api/orders/setReward', params),//立即打赏
		getReward:(params) => vm.$u.post('/api/user/getReward', params),//打赏记录
		
		getStoreInfo:(params) => vm.$u.post('/api/store/getStoreInfo', params),//门店详情
		
		//特色项目列表/详情
		getProject:(params) => vm.$u.post('/api/project/getProject', params),
		//推荐项目列表/详情
		getSysProject:(params) => vm.$u.post('/api/project/getSysProject', params),
		//项目分类
		getCate:(params) => vm.$u.post('/api/project/getCate', params),
		//项目功效
		getTags:(params) => vm.$u.post('/api/project/getTags', params),
		
		//可预约技师列表
		getTech:(params) => vm.$u.post('/api/project/getTech', params),
		//获取前台人员
		getStaff:(params) => vm.$u.post('/api/staff/getStaff', params),
		//可预约的时间节点
		getTimeNode:(params) => vm.$u.post('/api/project/getTimeNode', params),
		//确认预约
		confirmReserve:(params) => vm.$u.post('/api/project/confirmReserve', params),
		//购买项目
		buyProject:(params) => vm.$u.post('/api/project/buyProject', params),
		
		// 支付
		hfPay:(params) => vm.$u.post('/api/pay/hfPay', params),
		// 代付支付
		hfAgentPay:(params) => vm.$u.post('/api/pay/hfAgentPay', params),
		// 切换门店获取token
		checkStoreGetToken:(params) => vm.$u.post('/api/user/checkStoreGetToken', params),
		
		
		//预约列表/详情
		getReserve:(params) => vm.$u.post('/api/project/getReserve', params),
		//取消预约
		delReserve:(params) => vm.$u.post('/api/project/delReserve', params),
		
		// 门店列表
		getStore:(params) => vm.$u.post('/api/store/getStoreList', params),
		massCode :(params) => vm.$u.post('/api/sms/massCode', params),
		
		// 用户积分记录
		getUserIntegral :(params) => vm.$u.post('/api/user/getUserIntegral', params),
		// 分享记录
		getUserShare :(params) => vm.$u.post('/api/user/getUserShare', params),
		// 保存分享数据
		setUserShare :(params) => vm.$u.post('/api/user/setUserShare', params),
		getUserProjectComment :(params) => vm.$u.post('/api/project/getUserComment', params),
		
		// 创建预约
		reservation :(params) => vm.$u.post('/api/orders/reservation', params),
		
		// 积分分类
		integrateCateList :(params) => vm.$u.post('/api/goods/integrateCateList', params),
		
		// 获取有sku的商品规格ids
		getAttrIds :(params) => vm.$u.post('/api/goods/getAttrIds', params),
		
		// 商品退货
		setUserLogistics :(params) => vm.$u.post('/api/orders/setUserLogistics', params),
		// 获取物流公司
		getLogistics :(params) => vm.$u.post('/api/orders/getLogistics', params),
		
		// 今日
		// 申请开票
		setInvoice :(params) => vm.$u.post('/api/Invoice/setInvoice', params),
		// 开票公司列表/详情
		getCompany :(params) => vm.$u.post('/api/Invoice/getCompany', params),
		// 开票记录/详情
		getInvoice :(params) => vm.$u.post('/api/invoice/getInvoice', params),
		// 获取发票管家
		getInvoiceOrders :(params) => vm.$u.post('/api/invoice/getInvoiceOrders', params),
		
		// 顾客小程序 获取评价标签列表
		getEvaluate :(params) => vm.$u.post('/api/Setting/getEvaluate', params),
		// 查询企业名称
		searchName :(params) => vm.$u.post('/api/invoice/searchName', params),
		// 查询企业税号
		searchID :(params) => vm.$u.post('/api/invoice/searchID', params),
		// 取消原因
		getCancel :(params) => vm.$u.post('/api/project/getCancel', params),
		// 门店首页轮播图
		getAd :(params) => vm.$u.post('/api/home/getAd', params),
		// 充值记录
		getUserPrice :(params) => vm.$u.post('/api/user/getUserPrice', params),
		// 绑定记录
		getBindList :(params) => vm.$u.post('/api/vip/getBindList', params),
		// 使用次数
		projectUseNum :(params) => vm.$u.post('/api/user/projectUseNum', params),
		
		// 取消订单
		ordersCancel :(params) => vm.$u.post('/api/orders/cancel', params),
		
		
		// 查看物流
		getExpress :(params) => vm.$u.post('/api/user/getExpress', params),
		
		
		userSetInvoice :(params) => vm.$u.post('/api/user/setInvoice', params),
		returnOrders :(params) => vm.$u.post('/api/orders/returnOrders', params),
		
		getSysProjectStore: (params) => vm.$u.post('/api/project/getSysProjectStore', params), //项目的机构和介绍
	};
}

export default {
	install
}